<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Joueur" rel="Chapter" href="Joueur.html">
<link title="Joueur2" rel="Chapter" href="Joueur2.html">
<link title="Joueur3" rel="Chapter" href="Joueur3.html">
<link title="Joueur4" rel="Chapter" href="Joueur4.html"><title>Joueur.donne_info</title>
</head>
<body>
<code class="code"><span class="keyword">let</span>&nbsp;<span class="keyword">rec</span>&nbsp;donne_info&nbsp;objet&nbsp;((id_info,contenu):information)=<br>
<span class="comment">(*pour&nbsp;le&nbsp;moment&nbsp;il&nbsp;est&nbsp;de&nbsp;type&nbsp;'a&nbsp;puis&nbsp;ce&nbsp;quon&nbsp;en&nbsp;fait&nbsp;va&nbsp;le&nbsp;specifier&nbsp;sans&nbsp;dire&nbsp;quil&nbsp;sagit&nbsp;dun&nbsp;joueur_de_base&nbsp;(car&nbsp;pas&nbsp;encore&nbsp;defini)&nbsp;mais&nbsp;lors&nbsp;de&nbsp;lutilisation&nbsp;il&nbsp;vérifiera&nbsp;la&nbsp;compatibilité&nbsp;!&nbsp;cf&nbsp;https://mail.google.com/mail/?shva=1#all/11b3af0c2e14abce*)</span><br>
<span class="comment">(*pkoi&nbsp;rec&nbsp;?&nbsp;-&gt;&nbsp;si&nbsp;jamais&nbsp;une&nbsp;information&nbsp;en&nbsp;génère&nbsp;une&nbsp;autre...&nbsp;à&nbsp;voir:&nbsp;il&nbsp;faut&nbsp;peut&nbsp;etre&nbsp;distinguer&nbsp;les&nbsp;infos&nbsp;données&nbsp;par&nbsp;le&nbsp;conteur&nbsp;et&nbsp;celle&nbsp;déduite*)</span><br>
<span class="keyword">match</span>&nbsp;id_info&nbsp;<span class="keyword">with</span><br>
<span class="keywordsign">|</span>0&nbsp;<span class="keywordsign">-&gt;</span><span class="comment">(*deprecated*)</span>&nbsp;()<br>
<span class="keywordsign">|</span>1<span class="keywordsign">-&gt;</span><span class="keyword">begin</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">let</span>&nbsp;ce_que_je_sais=objet<span class="keywordsign">#</span>get_whoswho&nbsp;contenu.(0)&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;ce_que_je_sais&nbsp;&lt;&gt;&nbsp;<span class="constructor">Unknown</span>&nbsp;<span class="keywordsign">&amp;&amp;</span>&nbsp;(int2perso&nbsp;contenu.(1))&lt;&gt;&nbsp;ce_que_je_sais<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">then</span>&nbsp;(&nbsp;v_print&nbsp;3&nbsp;<span class="string">"%i:&nbsp;On&nbsp;me&nbsp;dit&nbsp;que&nbsp;%i&nbsp;est&nbsp;%s,&nbsp;or&nbsp;pour&nbsp;moi&nbsp;il&nbsp;est&nbsp;%s\n"</span>&nbsp;(objet<span class="keywordsign">#</span>get_id)&nbsp;(contenu.(0))&nbsp;(perso2string&nbsp;(int2perso&nbsp;contenu.(1)))&nbsp;(perso2string&nbsp;ce_que_je_sais)&nbsp;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objet<span class="keywordsign">#</span>mod_whoswho&nbsp;contenu.(0)&nbsp;(int2perso&nbsp;contenu.(1))<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">end</span><br>
<span class="keywordsign">|</span>2<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">assert</span>&nbsp;<span class="keyword">false</span>&nbsp;<span class="comment">(*ceci&nbsp;est&nbsp;une&nbsp;réponse&nbsp;de&nbsp;la&nbsp;part&nbsp;des&nbsp;joueurs&nbsp;uniquement*)</span><br>
<span class="keywordsign">|</span>3<span class="keywordsign">-&gt;</span>objet<span class="keywordsign">#</span>mod_whoswho&nbsp;contenu.(0)&nbsp;(<span class="constructor">Mort</span>&nbsp;(objet<span class="keywordsign">#</span>get_whoswho&nbsp;contenu.(0)))<br>
<span class="keywordsign">|</span>4<span class="keywordsign">-&gt;</span>(&nbsp;v_print&nbsp;0&nbsp;<span class="string">"&nbsp;&nbsp;&nbsp;%i&nbsp;:&nbsp;j'ai&nbsp;bien&nbsp;recu&nbsp;le&nbsp;fait&nbsp;que&nbsp;%i&nbsp;a&nbsp;voté&nbsp;contre&nbsp;%i&nbsp;au&nbsp;vote&nbsp;n°%i&nbsp;(tour:&nbsp;%i)&nbsp;mais&nbsp;je&nbsp;nen&nbsp;fait&nbsp;rien&nbsp;pour&nbsp;le&nbsp;moment\n"</span>&nbsp;objet<span class="keywordsign">#</span>get_id&nbsp;contenu.(3)&nbsp;contenu.(4)&nbsp;contenu.(0)&nbsp;contenu.(2))<br>
<span class="keywordsign">|</span>5<span class="keywordsign">-&gt;</span>failwith&nbsp;(<span class="constructor">Printf</span>.sprintf&nbsp;<span class="string">"%i:&nbsp;j'ai&nbsp;recu&nbsp;une&nbsp;info&nbsp;concernant&nbsp;le&nbsp;conteur,&nbsp;il&nbsp;y&nbsp;a&nbsp;erreur\n"</span>&nbsp;objet<span class="keywordsign">#</span>get_id)<br>
<span class="keywordsign">|</span>_<span class="keywordsign">-&gt;</span>&nbsp;()</code></body></html>